package bean;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import entity.user.LoginVo;
import lombok.extern.log4j.Log4j;

@Log4j
@RestController
public class LoginController extends BaseController {

	@RequestMapping(value = "/loginForm", method = RequestMethod.POST)
	public String login(HttpServletRequest request, @RequestBody LoginVo vo) {
		log.info("User[" + vo.getEmail() + "] has come and password is " + vo.getPasswd());
		return "success";
	}

	@RequestMapping(value = "/registerForm", method = RequestMethod.POST)
	public String register(HttpServletRequest request, @RequestBody LoginVo vo) {
		log.info("User[" + vo.getEmail() + "] has come and password is " + vo.getPasswd());
		return "success";
	}
}
